package com.example.yian.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.yian.entity.SecurityRisk;
import com.example.yian.entity.SecurityRiskReport;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SecurityRiskReportMapper extends BaseMapper<SecurityRiskReport> {
    /**
     * 根据user_id分页查询隐患列表
     *
     * @param page    分页对象
     * @param user_id 用户ID
     * @return 分页数据
     */
    List<SecurityRiskReport> getRiskReportListByUserIdWithPagination(@Param("page") Page<SecurityRiskReport> page,
                                                         @Param("userId") Long userId,
                                                         @Param("startTime") String startTime,
                                                         @Param("endTime") String endTime,
                                                         @Param("limit") int limit,
                                                         @Param("offset") int offset);
}
